﻿using System.ComponentModel.DataAnnotations;
using System.Data;

namespace Hwh_Shop.Models
{
	public class UserRegister
	{
		//[StringLength(20, ErrorMessage = "昵称不能超过20字符")]
		//public string Name { get; set; }
		/// <summary>
		/// 
		/// </summary>
		/// <example>12345678901</example>
		[Phone(ErrorMessage = "电话号码格式不正确")]
		public string Tel { get; set; }
		// 设置密码长度为6-16位，只能包含字母和数字
		[RegularExpression(@"^[a-zA-Z0-9]{6,16}$", ErrorMessage = "密码只能包含字母和数字且长度为6-16位")]
		//[StringLength(maximumLength: 30, MinimumLength = 6, ErrorMessage = "请输入正确密码")]
		public string Password { get; set; }
		/// <summary>
		/// 确认
		/// </summary>
		public string CifrgPassword { get; set; }
	}
}
